@import "./helper/override-element-ui";

* {
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, segoe ui, Roboto, helvetica neue, Arial, noto sans, sans-serif,
    apple color emoji, segoe ui emoji, segoe ui symbol, noto color emoji;
  font-size: 14px;
  line-height: 1.5;
  color: #1f2f3d;
}

pre {
  font-size: 12px;
}

.clearfix {
  overflow: auto;
  zoom: 1;
}

.el-tabs--border-card {
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
}

.text-danger {
  color: #f56c6c;
}

.pull-right {
  float: right;
}

.form-highlight {
  min-height: 80px;
  border: 1px dashed #e6a23c;
}

.row-highlight {
  min-height: 30px;
}

.col-highlight {
  min-height: 30px;
  border: 1px dashed #e6a23c;
}

.sortable {
  margin-bottom: 10px;

  &__handle {
    display: flex;
    align-items: center;
    height: 28px;
    cursor: move;
  }

  &__ghost {
    position: relative;

    &:before {
      position: absolute;
      top: -2px;
      left: 0;
      width: 100%;
      height: 2px;
      content: "";
      background: #f56c6c;
    }
  }

  &__drag {
    outline: 1px dotted #0170fe;
  }
}

.fb-inline .editable {
  display: inline-block;
}

.stage--preview {
  .editable {
    padding: 0;
    border: none !important;
    background: none !important;

    &__name,
    &__handle,
    &__actions {
      display: none;
    }
  }

  .form-highlight,
  .row-highlight,
  .col-highlight {
    min-height: auto;
    border: none;
  }
}

.editable {
  position: relative;
  cursor: pointer;
  border: 2px solid transparent;
  padding: 12px 0 10px 0;

  //&:after {
  //  position: absolute;
  //  left: 0;
  //  right: 0;
  //  top: 0;
  //  bottom: 0;
  //  display: block;
  //  z-index: 8;
  //  content: "";
  //}

  &.active {
    border-color: #409eff;
    background: #ecf5ff;

    & > .editable__handle,
    & > .editable__actions {
      display: flex;
    }
  }

  &__bd {
    padding: 0 5px;

    .el-form-item {
      margin-bottom: 0;
    }

    .el-dialog__wrapper {
      position: static !important;
    }
  }

  &__name {
    font-size: 10px;
    color: green;
    position: absolute;
    top: 0;
    right: 0;
    display: inline-block;
    z-index: 99;
    line-height: 1;
  }

  &__handle {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    font-size: 14px;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #409eff;
    z-index: 10;
    cursor: move;
  }

  &__actions {
    display: none;
    position: absolute;
    right: 0;
    bottom: 0;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    background: #409eff;
    font-size: 17px;
    padding: 5px 5px;
    z-index: 10;

    i {
      margin: 0 5px;
    }
  }
}

.side {
  position: relative;
  margin: -10px;
  height: calc(50vh - 70px);
  padding-top: 38px;

  &__hd {
    position: absolute;
    top: 3px;
    left: 0;
    z-index: 20;
    width: 100%;
    height: 38px;
  }

  &__bd {
    height: 100%;
    overflow-y: auto;
  }
}
